package com.john.bms.model.system.user;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 86920
 * @desc:用户类
 * @info:这里必须实现序列化，不然shiro那边会报==>org.apache.shiro.io.SerializationException: Unable to serialize object
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysUser implements Serializable {

    private String id;

    private String userName;

    private String password;

    @Version
    private Long version;

    private Integer state;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date updateTime;

    private Integer rId;

    /**
     * 逻辑删除
     */
    @TableLogic
    private int del;

}
